package com.btpj.blog_server.entity;

import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 请求返回的封装实体
 *
 * @author BTPJ  2020/5/20
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BaseResp<T> {

    /**
     * 请求状态0成功 1失败 2登录过期
     */
    private int status;
    private T data;
    private String msg;
    private Integer totalCount;
    private Integer page;
    private Integer pageCount;

    public BaseResp() {
    }

    public BaseResp(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public BaseResp(int status, String msg, T data) {
        this.status = status;
        this.data = data;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }
}
